/* =========================================
   SHARED SERVICE PAGE STYLES (svc- prefix)
   Used by: public-credit-rating, credit-assessment,
   credit-insights, portfolio-assessment, spo
   ========================================= */

/* 1. Hero Banner — uses shared .page-hero from style.css */
/* Service pages use slightly taller hero */
.page-hero.svc-hero {
    padding: 120px 0 80px;
}
.page-hero.svc-hero h1 {
    font-size: 3rem;
}
.page-hero.svc-hero .page-hero-desc {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 0;
}

/* 2. "What is" / Intro Section — two-column layout */
.svc-intro {
    padding: 100px 0;
    background: var(--bg-main);
}

/* intro-layout component → see style.css */

/* 3. Use Cases Section */
.svc-usecases {
    padding: 100px 0;
    background: var(--surface-color);
    position: relative;
}

.svc-usecases::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-color), transparent);
}

.svc-usecases-header {
    text-align: center;
    margin-bottom: 56px;
}

.svc-usecases-header .section-title {
    margin-bottom: 16px;
}

.svc-usecases-subtitle {
    font-size: 1.05rem;
    color: var(--text-muted);
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.7;
}

.svc-usecases-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.svc-usecase-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 36px 28px;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    position: relative;
    overflow: hidden;
}

.svc-usecase-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--secondary-color), var(--accent-color));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.svc-usecase-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
    border-color: var(--secondary-color);
}

.svc-usecase-card:hover::before {
    opacity: 1;
}

.svc-usecase-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(var(--secondary-rgb), 0.1), rgba(var(--accent-rgb), 0.06));
    color: var(--secondary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.svc-usecase-card h3 {
    font-size: 1.15rem;
    margin-bottom: 12px;
    color: var(--primary-color);
}

.svc-usecase-card p {
    color: var(--text-muted);
    font-size: 0.92rem;
    line-height: 1.7;
    margin: 0;
}

/* 4. Comparison Table Section */
.svc-compare {
    padding: 100px 0;
    background: var(--bg-main);
}

.svc-compare-header {
    text-align: center;
    margin-bottom: 48px;
}

.svc-compare-header .section-title {
    margin-bottom: 16px;
}

.svc-compare-table-wrapper {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    box-shadow: var(--shadow-sm);
}

.svc-compare-table {
    width: 100%;
    min-width: 520px;
    border-collapse: collapse;
}

.svc-compare-table thead {
    background: var(--primary-color);
}

.svc-compare-table thead th {
    padding: 18px 24px;
    text-align: left;
    color: #fff;
    font-size: 0.88rem;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.svc-compare-table thead th:first-child {
    width: 200px;
}

.svc-compare-table tbody tr {
    border-bottom: 1px solid var(--border-color);
    transition: background 0.2s ease;
}

.svc-compare-table tbody tr:last-child {
    border-bottom: none;
}

.svc-compare-table tbody tr:hover {
    background: rgba(var(--secondary-rgb), 0.03);
}

.svc-compare-table td {
    padding: 18px 24px;
    font-size: 0.92rem;
    color: var(--text-dark);
    line-height: 1.6;
    vertical-align: top;
}

.svc-compare-table td:first-child {
    font-weight: 600;
    color: var(--primary-color);
}

.svc-compare-highlight {
    background: rgba(var(--secondary-rgb), 0.04);
}

/* 5. Stats / Market Presence Section */
.svc-stats {
    position: relative;
    background: linear-gradient(135deg, var(--primary-color) 0%, #122040 50%, var(--primary-color) 100%);
    color: #fff;
    padding: 80px 0;
    overflow: hidden;
}

.svc-stats .stats-bg-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
}

.svc-stats .glow-1 {
    top: -20%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: rgba(var(--secondary-rgb), 0.08);
}

.svc-stats .glow-2 {
    bottom: -20%;
    right: -10%;
    width: 400px;
    height: 400px;
    background: rgba(var(--accent-rgb), 0.06);
}

.svc-stats-header {
    text-align: center;
    margin-bottom: 56px;
    position: relative;
    z-index: 2;
}

.svc-stats-header .section-title {
    color: #fff;
    margin-bottom: 16px;
}

.svc-stats-subtitle {
    font-size: 1.05rem;
    color: rgba(255,255,255,0.65);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.7;
}

.svc-stats-grid {
    display: flex;
    justify-content: space-around;
    gap: 24px;
    position: relative;
    z-index: 2;
    margin-bottom: 48px;
}

.svc-stat-card {
    text-align: center;
    flex: 1;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: var(--radius-md);
    padding: 36px 24px;
    backdrop-filter: blur(8px);
    transition: transform 0.3s ease, background 0.3s ease, border-color 0.3s ease;
}

.svc-stat-card:hover {
    transform: translateY(-4px);
    background: rgba(255,255,255,0.08);
    border-color: rgba(var(--accent-rgb), 0.35);
}

.svc-stat-number {
    font-family: var(--font-serif);
    font-size: 3rem;
    font-weight: 700;
    background: linear-gradient(135deg, #fff 0%, var(--accent-color) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.1;
    margin-bottom: 8px;
}

.svc-stat-label {
    font-size: 0.95rem;
    color: rgba(255,255,255,0.7);
    line-height: 1.5;
}

.svc-stats-action {
    text-align: center;
    position: relative;
    z-index: 2;
}

/* 6. Service Description — 3-column Benefits/Features/Audience */
.svc-details {
    padding: 100px 0;
    background: var(--bg-main);
}

.svc-details-header {
    text-align: center;
    margin-bottom: 64px;
}

.svc-details-header .section-title {
    margin-bottom: 16px;
}

.svc-details-columns {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.svc-details-block {
    position: relative;
}

.svc-details-block-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
}

.svc-details-block-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.svc-details-block-icon.green {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
}

.svc-details-block-icon.blue {
    background: rgba(var(--secondary-rgb), 0.08);
    color: var(--secondary-color);
}

.svc-details-block-icon.purple {
    background: rgba(139, 92, 246, 0.1);
    color: #7c3aed;
}

.svc-details-block h3 {
    font-size: 1.2rem;
    color: var(--primary-color);
    margin: 0;
}

.svc-check-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.svc-check-list li {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    font-size: 0.95rem;
    color: var(--text-dark);
    line-height: 1.7;
}

.svc-check-list li .check-icon {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 2px;
}

.svc-check-list li .check-icon.green {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
}

.svc-check-list li .check-icon.blue {
    background: rgba(var(--secondary-rgb), 0.08);
    color: var(--secondary-color);
}

.svc-check-list li .check-icon.purple {
    background: rgba(139, 92, 246, 0.1);
    color: #7c3aed;
}

/* 7. Why VIS Rating Section */
.svc-why {
    padding: 100px 0;
    background: var(--surface-color);
    position: relative;
}

.svc-why::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-color), transparent);
}

.svc-why-header {
    text-align: center;
    margin-bottom: 56px;
}

.svc-why-header .section-title {
    margin-bottom: 16px;
}

.svc-why-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.svc-why-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 36px 28px;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    position: relative;
    overflow: hidden;
}

.svc-why-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--secondary-color), var(--accent-color));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.svc-why-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
    border-color: var(--secondary-color);
}

.svc-why-card:hover::before {
    opacity: 1;
}

.svc-why-card-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
    color: #fff;
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 20px;
}

.svc-why-card h3 {
    font-size: 1.15rem;
    margin-bottom: 12px;
    color: var(--primary-color);
}

.svc-why-card p {
    color: var(--text-muted);
    font-size: 0.92rem;
    line-height: 1.7;
    margin: 0;
}

/* 8. Navigation Cards (links to sub-pages) */
.svc-nav-section {
    padding: 0 0 100px;
    background: var(--bg-main);
}

.svc-nav-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.svc-nav-card {
    display: flex;
    align-items: center;
    gap: 20px;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 28px 24px;
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    position: relative;
    overflow: hidden;
}

.svc-nav-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--secondary-color), var(--accent-color));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.svc-nav-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    border-color: var(--secondary-color);
}

.svc-nav-card:hover::after {
    transform: scaleX(1);
}

.svc-nav-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(var(--secondary-rgb), 0.1), rgba(var(--accent-rgb), 0.06));
    color: var(--secondary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.svc-nav-content h3 {
    font-size: 1.05rem;
    margin-bottom: 4px;
    color: var(--primary-color);
}

.svc-nav-content p {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin: 0;
    line-height: 1.5;
}

.svc-nav-arrow {
    margin-left: auto;
    color: var(--secondary-color);
    opacity: 0;
    transform: translateX(-8px);
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.svc-nav-card:hover .svc-nav-arrow {
    opacity: 1;
    transform: translateX(0);
}

/* Desktop tuning: keep long nav titles on a single line without shrinking too much */
@media (min-width: 993px) {
    .svc-nav-grid {
        grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr);
    }

    .svc-nav-card {
        gap: 16px;
        padding: 26px 20px;
    }

    .svc-nav-icon {
        width: 52px;
        height: 52px;
    }

    .svc-nav-content {
        min-width: 0;
    }

    .svc-nav-content h3 {
        white-space: nowrap;
        line-height: 1.2;
        margin-bottom: 2px;
        letter-spacing: -0.01em;
    }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 992px) {
    .svc-nav-grid,
    .svc-usecases-grid,
    .svc-why-grid {
        grid-template-columns: 1fr;
    }

    .svc-stats-grid {
        flex-direction: column;
        gap: 20px;
    }

    .svc-details-columns {
        grid-template-columns: 1fr;
        gap: 48px;
    }
}

@media (max-width: 768px) {
    .page-hero.svc-hero {
        padding: 80px 0 40px;
    }

    .page-hero.svc-hero h1 {
        font-size: 2.2rem;
    }

    .svc-intro,
    .svc-usecases,
    .svc-compare,
    .svc-details,
    .svc-why {
        padding: 56px 0;
    }

    .svc-stats {
        padding: 56px 0;
    }

    .svc-nav-section {
        padding: 0 0 56px;
    }

    /* page-hero-actions mobile handled by style.css */

    .svc-nav-card {
        padding: 20px 16px;
        border-radius: 16px;
        gap: 12px;
    }

    .svc-nav-icon {
        width: 44px;
        height: 44px;
        border-radius: 10px;
    }

    .svc-nav-icon svg {
        width: 22px;
        height: 22px;
    }

    .svc-nav-content {
        min-width: 0;
        flex: 1;
    }

    .svc-nav-content h3 {
        font-size: clamp(0.82rem, 3.2vw, 0.96rem);
        line-height: 1.2;
        margin-bottom: 2px;
        white-space: nowrap;
        letter-spacing: -0.01em;
    }

    .svc-nav-content p {
        font-size: 0.78rem;
    }

    .svc-nav-arrow svg {
        width: 18px;
        height: 18px;
    }

    .svc-usecase-card,
    .svc-why-card {
        padding: 28px 20px;
        border-radius: 16px;
    }

    .svc-why-header,
    .svc-stats-header,
    .svc-details-header,
    .svc-usecases-header,
    .svc-compare-header {
        text-align: left;
    }

    .svc-stats-subtitle,
    .svc-usecases-subtitle {
        margin-left: 0;
    }

    .svc-compare-table thead th {
        padding: 14px 16px;
        font-size: 0.82rem;
    }

    .svc-compare-table thead th:first-child {
        width: 140px;
        min-width: 140px;
    }

    .svc-compare-table td {
        padding: 14px 16px;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .svc-nav-card {
        gap: 10px;
    }

    .svc-nav-icon {
        width: 40px;
        height: 40px;
    }

    .svc-nav-icon svg {
        width: 20px;
        height: 20px;
    }

    .svc-nav-content h3 {
        font-size: 0.78rem;
    }

    .page-hero.svc-hero h1 {
        font-size: 1.8rem;
    }

    .svc-stat-number {
        font-size: 2.5rem;
    }

    .svc-compare-table-wrapper {
        border-radius: 12px;
    }
}

/* ===== SPO Results CTA ===== */
.svc-spo-cta {
    padding: 80px 0;
}

.svc-spo-cta-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    padding: 48px 56px;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
}

.svc-spo-cta-content .section-title {
    margin-bottom: 8px;
}

.svc-spo-cta-content p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin: 0;
    line-height: 1.6;
}

@media (max-width: 768px) {
    .svc-spo-cta-box {
        flex-direction: column;
        text-align: center;
        padding: 32px 24px;
    }
}
